/*
填空处为：data[i]=temp[i-l];
*/
#include <stdio.h>

void merge_sort(int *data, int l, int r) {
	if (l == r) {
		return ;
	}
	int mid = (l + r) / 2;
	merge_sort(data, l, mid);
	merge_sort(data, mid + 1, r);
	int temp[r - l + 1];
	int x = l, y = mid + 1, loc = 0;
	while (x <= mid || y <= r) {
		if (x <= mid && (y > r || data[x] <= data[y])) {
			temp[loc] = data[x];
			x++;
		} else {
			temp[loc] = data[y];
			y++;
		}
		loc++;
	}
	for (int i = l; i <= r; ++i) {
		// 在下面填入一行代码
		data[i]=temp[i-l];
	}
}

int main() {
	int n;
	scanf("%d", &n);
	int arr[n];
	for (int i = 0; i < n; ++i) {
		scanf("%d", &arr[i]);
	}
	merge_sort(arr, 0, n - 1);
	for (int i = 0; i < n; ++i) {
		printf("%d%c", arr[i], " \n"[i == n-1]);
	}
	return 0;
}